package cn.cdeden.knowledge.mapper;

import cn.cdeden.knowledge.domain.SysCalendar;
import cn.cdeden.knowledge.domain.dto.MissionToCalendarDTO;
import cn.cdeden.knowledge.domain.dto.SysCalendarDto;
import cn.cdeden.knowledge.domain.dto.SysCalendarQueryParam;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author Yu.
* @date 2023-02-02
*/
@Repository
public interface SysCalendarMapper extends BaseMapper<SysCalendar> {
    List<SysCalendarDto> getCalendarList(@Param("userId") Long userId, @Param("startTime") String startTime,
                                         @Param("endTime") String endTime, @Param("type") String type,
                                         @Param("scheduleId") Long scheduleId);

    IPage<SysCalendar> queryPageAll(@Param("query") SysCalendarQueryParam query, @Param("queryPage") IPage queryPage,
                                    @Param("startDateStr") String startDateStr, @Param("endDateStr") String endDateStr, @Param("toDateStr") String toDateStr);

    List<String> getWeekly(@Param("v") String v, @Param("userId") Long userId);

    Boolean updateMissionCalendar(@Param("missionToCalendarDTO") MissionToCalendarDTO missionToCalendarDTO);

    List<SysCalendar> getDetailShow(Long calendarId);
}
